package com.wing.order.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.order.model.entity.InventoryOutPlan;
import com.wing.order.model.response.InventoryInoutJobVO;
import com.wing.order.model.response.InventProductVo;
import com.wing.order.model.response.InventoryOutPlanVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 出库单计划-Dao
 *
 * @author
 */
@Mapper
public interface InventoryOutPlanDao extends BaseMapper<InventoryOutPlan> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<InventoryOutPlanVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    List<InventoryOutPlanVO> list4app(@Param("page") Page<InventoryOutPlanVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    InventoryOutPlanVO get4appById(Long id);

    public Page<InventoryOutPlan> getInventoryOutPlanPageList (IPage<InventoryOutPlan> page, @Param("ew") QueryWrapper<InventoryOutPlan> queryWrapper);

    InventoryOutPlanVO getInventoryOutPlanById(@Param("id") Long id);

    List<InventProductVo> getInventProductDetailById(@Param("id") Long id);

    InventoryOutPlanVO getInventoryOutPlanWarehouseById(@Param("id") Long id);

    public Page<InventoryInoutJobVO> getInventoryOutWorkRecordPageList (IPage<InventoryInoutJobVO> page, @Param("ew") QueryWrapper<InventoryInoutJobVO> queryWrapper);

    Integer getInventoryOutPlanSum(@Param("planId") Long planId);
}
